<?php
session_start();
include('connection.php');
if(isset($_SESSION['username']) || isset($_SESSION['password']))
{
?>
<html>
 <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">

    <title>Starter Template for Bootstrap</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.css" rel="stylesheet">

    <!-- Custom styles for this template -->
   

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    
       <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>

         <script src="js/bootstrap.js"></script>  
         
         <script src="datepicker/js/bootstrap-datepicker.js"></script>
                 <script type="text/javascript">
 $(function(){
	  $("#news").submit(function(e){
		 
       e.preventDefault();
 
      
			dataString= $('#news').serialize();
			$.ajax({
			
			type: "POST",
			url: "newsconfirom.php",
			data: dataString,
				success: function(response){
					
					alert(response);
				
		}
		});});
	  $('.dpYears').datepicker();
 });

</script>

         <link href="datepicker/css/datepicker.css" rel="stylesheet"/>
         <link href="datepicker/less/datepicker.less" rel="stylesheet" />
      

    
    
  </head>
  <body>
<?php include('addminmenu.php'); ?>
<div class="container" style="margin-top:107px;">
<div class="row">
    <div class="col-sm-12 ">
<div class="">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>    <script src="jquery/jquery.js"></script>   <script>




function getdata(cat,page)
		 {
	
				 $.ajax({
type: "GET",
url: "getdetail.php",
data: "from="+cat+ "&page="+page ,
success: function(response){

$('.success').fadeIn(200).show();
$('.error').fadeOut(200).hide();
 document.getElementById("show1").innerHTML = response;
    }
});
		 
	
		 
		 }		 
		
$(document).ready(function(){
	   $("#searchform").hide();
	    $("#addvance").click(function(){
		   $("#searchform").slideToggle(1000);
          });
	   search ('1');
        
         

  });

	  
  function search(page) {
	
$.ajax({
type: "POST",
url: "searchstudent.php",
data:   "page="+ page + "&gender=" + document.getElementById('gender').value + "&formnumber=" +document.getElementById('formnumber').value+
         "&studentname=" +document.getElementById('studentname').value + "&fathername=" +document.getElementById('fathername').value,
		 success: function(response){
$('.success').fadeIn(200).show();
$('.error').fadeOut(200).hide();

 document.getElementById("show1").innerHTML = response;
    }
});

}






</script>
<div class="container">
<table >
    <tbody>
        <tr>
            <td><input type="button" value="All" class="button btn-success" onClick="search('1')" /> <input type="button" value="A" onClick="getdata(this.value,'1')" /> <input type="button" value="B" onClick="getdata(this.value,'1')" /> <input type="button" value="C" onClick="getdata(this.value,'1')" /> <input type="button" value="D" onClick="getdata(this.value,'1')" /> <input type="button" value="E" onClick="getdata(this.value,'1')" /> <input type="button" value="F" onClick="getdata(this.value,'1')" /> <input type="button" value="G" onClick="getdata(this.value,'1')" /> <input type="button" value="H" onClick="getdata(this.value,'1')" /> <input type="button" value="I" onClick="getdata(this.value,'1')" /> <input type="button" value="J" onClick="getdata(this.value,'1')" /> <input type="button" value="K" onClick="getdata(this.value,'1')" /> <input type="button" value="L" onClick="getdata(this.value,'1')" /> <input type="button" value="M" onClick="getdata(this.value,'1')" /> <input type="button" value="N" onClick="getdata(this.value,'1')" /> <input type="button" value="O" onClick="getdata(this.value,'1')" /> <input type="button" value="P" onClick="getdata(this.value,'1')" /> <input type="button" value="Q" onClick="getdata(this.value,'1')" /> <input type="button" value="R" onClick="getdata(this.value,'1')" /> <input type="button" value="S" onClick="getdata(this.value,'1')" /> <input type="button" value="T" onClick="getdata(this.value,'1')" /> <input type="button" value="U" onClick="getdata(this.value,'1')" /> <input type="button" value="V" onClick="getdata(this.value,'1')" /> <input type="button" value="W" onClick="getdata(this.value,'1')" /> <input type="button" value="X" onClick="getdata(this.value,'1')" /> <input type="button" value="Y" onClick="getdata(this.value,'1')" /> <input type="button" value="Z" onClick="getdata(this.value,'1')" /> <input type="button" value="Advance Search" id="addvance" class="AdvanceSearch" /></td>
        </tr>
    </tbody>
</table>
<form id="searchform" method="post" name="form" class="form-horizontal" style="margin-top:20px;">
    <table style="width:90%;">
        <tbody>
            <tr>
                <td>Student Form Number</td>
                <td><input type="text" name="formnumber" id="formnumber" class="form-control" /></td>
                <td>Gender</td>
                <td><select name="gender" id="gender" class="form-control">
                <option value="">-Select Gender-</option>
                <option value="male">Male</option>
                <option value="Female">Female</option>
                               </select></td>
            </tr>
            <tr>
                <td>Student Name</td>
                <td><input type="text" name="studentname" id="studentname" class="form-control"/></td>
                <td>Father Name</td>
                <td><input type="text" name="fathername" id="fathername" class="form-control"/></td>
            </tr>
            
            <tr>
                <td height="26"><input type="button" value="search" id="" class="AdvanceSearch button" onClick="search('1')" /></td>
            </tr>
        </tbody>
    </table>
</form>
<div id="show1">&nbsp;</div>

	
					</div>
					</div>
                    </div>
                    </div>
                    </div>
                    <?PHP

}
else
{	header("location:index.php");
}
?>
</body>
</html>